

const constant = {

}

/**
 * 日期组件快速选择数据
 * @type {*[]}
 */
constant.SHORTCUTS =  [{
    text: '最近一周',
    value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
        return [start, end]
    },
}, {
    text: '最近一个月',
    value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
        return [start, end]
    },
}, {
    text: '最近三个月',
    value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
        return [start, end]
    },
}]

/**
 * 调试模式
 *
 */
constant.DEBUG = true

/**
 * 字典加载异常常量
 * @type {{disabled: boolean, label: string, value: string}[]}
 */
constant.DICT_EXCEPTION = [
    {label:'加载字典异常',value:"error",disabled:true}
]

/**
 * 远程加载异常常量
 * @type {{disabled: boolean, label: string, value: string}[]}
 */
constant.DATA_EXCEPTION = [
    {label:'远程加载选项数据异常',value:"error",disabled:true}
]

/**
 * 组件加载异常常量
 * @type {{disabled: boolean, label: string, value: string}[]}
 */
constant.MODULE_EXCEPTION = [
    {label:'组件加载选项数据异常',value:"error",disabled:true}
]

export default constant